package com.itshen.mapper;

import com.itshen.common.CommonMapper;
import com.itshen.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
 * @copyright: CTSIG
 * @author: stephen.shen
 * @email: shenzhaoxiang@ctsig.com
 * @create: 2018-11-30 14:53
 */
@org.apache.ibatis.annotations.Mapper
public interface UserMapper extends CommonMapper<User> {
    @Select("select * from user where id = #{uid}")
    User findById(Long uid);

    @Insert("insert into user (name, mobile) values (#{name}, #{mobile})")
    void add(User user);

    @Select("select * from user where id = #{uid}")
    User find(@Param("uid") Long uid);
}
